﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Threading.Tasks;

namespace WqLunTan.Models.DataBase
{
    /// <summary>
    /// 热门文章列表
    /// </summary>
    [Table("article_hot")]
    public class article_hot : BaseUpdateEntity
    {
        /// <summary>
        /// 标题
        /// </summary>
        [MaxLength(50)]
        [Required(AllowEmptyStrings = true)]
        public string title { get; set; } = string.Empty;

        /// <summary>
        /// 链接
        /// </summary>
        [MaxLength(255)]
        [Required(AllowEmptyStrings = true)]
        public string url { get; set; } = string.Empty;

        /// <summary>
        /// 修改人
        /// </summary>
        [MaxLength(255)]
        [Required(AllowEmptyStrings = true)]
        public string change_user_name { get; set; } = string.Empty;

        /// <summary>
        /// 排序数字
        /// </summary>
        [Range(1, 100)]
        public int sort_num { get; set; } = 100;

        /// <summary>
        /// 是否显示
        /// </summary>
        public bool is_show { get; set; }
    }
}
